<template>
	<view>
		<view class="page">
			<comp-common v-bind="{data:data}" @getUserInfo="getUserInfo" @myLogin="myLogin" @getPhoneNumber="getPhoneNumber" @hideGetCoupon="hideGetCoupon" @closeCouponBox="closeCouponBox" @navigatorClick="navigatorClick"></comp-common>
			<comp-header v-bind="{data:data}" @relevanceError="relevanceError" @relevanceSuccess="relevanceSuccess"></comp-header>
			<view class="body after-navber">
				<view class="article-list">
            <navigator class="flex-row article-item" :url="'/pages/article-detail/article-detail?id='+item.id" v-for="(item,index) in data.article_list" :key="index">
                <view class="flex-grow-1 flex-y-center title">
                    {{item.title}}
                </view>
                <view class="flex-grow-0 flex-y-center">
                    <image class="pointer" :src="data.__wxapp_img.dapp.jiantou_r.url"></image>
                </view>
            </navigator>
        </view>
			</view>
			<comp-footer v-bind="{data:data}"></comp-footer>
		</view>
	</view>
</template>

<script>var myVue = {};
	export default {
		data() {
			return {
				data: {
        article_list: []
    },
			};
		},
		onLoad: function(t) {myVue = this;
        myVue.getApp.page.onLoad(this, t);
        var a = this;
        myVue.getApp.core.showLoading(), myVue.getApp.request({
            url: myVue.getApp.api.default.article_list,
            data: {
                cat_id: 2
            },
            success: function(t) {
                a.getApp.core.hideLoading(), a.setData({
                    article_list: t.data.list
                });
            }
        });
    }
	}
</script>

<style scoped>
.article-list {
    border-top: 1upx solid #e3e3e3;
}

.article-item {
    background: #fff;
    border-bottom: 1upx solid #e3e3e3;
    padding: 0 24upx;
    height: 100upx;
}

.article-item .title {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.article-item .pointer {
    width: 12upx;
    height: 24upx;
    margin-left: 24upx;
}
</style>
